package yxy.game.pm2.bean.db.po;

import yxy.apple.db.ResultObjectBuilder;

import java.util.Date;

public class KowRecordPo {

    private String playerCode;
    private Date date;// 时间
    private String recordCode;// 录像code

    private String attackerCode;// 进攻方
    private String defenderCode;// 防守方

    private int scoreChangeAttacker;// 进攻方分数变化
    private int scoreChangeDefender;// 防守方分数变化
    private String battleResult;
    private long updateTime;

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    public static ResultObjectBuilder<KowRecordPo> builder = rs -> {
        KowRecordPo u = new KowRecordPo();
        u.setPlayerCode(rs.getString("pCode"));
        u.setDate(rs.getDate("date"));
        u.setRecordCode(rs.getString("recordCode"));
        u.setAttackerCode(rs.getString("attackerCode"));
        u.setDefenderCode(rs.getString("defenderCode"));
        u.setScoreChangeAttacker(rs.getInt("scoreChangeAttacker"));
        u.setScoreChangeDefender(rs.getInt("scoreChangeDefender"));
        u.setBattleResult(rs.getString("battleResult"));
        return u;
    };

    public String getPlayerCode() {
        return playerCode;
    }

    public void setPlayerCode(String playerCode) {
        this.playerCode = playerCode;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getRecordCode() {
        return recordCode;
    }

    public void setRecordCode(String recordCode) {
        this.recordCode = recordCode;
    }

    public String getAttackerCode() {
        return attackerCode;
    }

    public void setAttackerCode(String attackerCode) {
        this.attackerCode = attackerCode;
    }

    public String getDefenderCode() {
        return defenderCode;
    }

    public void setDefenderCode(String defenderCode) {
        this.defenderCode = defenderCode;
    }

    public int getScoreChangeAttacker() {
        return scoreChangeAttacker;
    }

    public void setScoreChangeAttacker(int scoreChangeAttacker) {
        this.scoreChangeAttacker = scoreChangeAttacker;
    }

    public int getScoreChangeDefender() {
        return scoreChangeDefender;
    }

    public void setScoreChangeDefender(int scoreChangeDefender) {
        this.scoreChangeDefender = scoreChangeDefender;
    }

    public String getBattleResult() {
        return battleResult;
    }

    public void setBattleResult(String battleResult) {
        this.battleResult = battleResult;
    }

    public static ResultObjectBuilder<KowRecordPo> getBuilder() {
        return builder;
    }

    public static void setBuilder(ResultObjectBuilder<KowRecordPo> builder) {
        KowRecordPo.builder = builder;
    }



    @Override
    public String toString() {
        return "KowRecordPo{" +
                "playerCode='" + playerCode + '\'' +
                ", date=" + date +
                ", recordCode='" + recordCode + '\'' +
                ", attackerCode='" + attackerCode + '\'' +
                ", defenderCode='" + defenderCode + '\'' +
                ", scoreChangeAttacker=" + scoreChangeAttacker +
                ", scoreChangeDefender=" + scoreChangeDefender +
                ", battleResult='" + battleResult + '\'' +
                '}';
    }
}
